import Vue from 'vue'
import Router from 'vue-router'
import { Layout, Content } from "@/components"
import Home from '@/views/home'
import Login from '@/views/login'

import User from '@/views/system/user'
import Role from '@/views/system/role'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'content',
      component: Content,
      redirect: '/home',
      children: [{
        path: '/home',
        name: 'home',
        component: Home
      }, {
        path: 'system',
        name: 'system',
        component: Layout,
        children: [{
          path: 'role',
          name: 'role',
          component: Role
        }, {
          path: 'user',
          name: 'user',
          component: User
        }]
      }]
    }, {
      path: '/login',
      name: 'login',
      component: Login
    }
  ]
})
